//
//  BusinessTypeController.m
//  ScalperMerchant
//
//  Created by 王云 on 2017/10/7.
//  Copyright © 2017年 WY. All rights reserved.
//

#import "BusinessTypeController.h"
#import "RegViewController.h"
#import "SCLoginController.h"
#import "HomeController.h"

@interface BusinessTypeController ()

@end

@implementation BusinessTypeController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.title = @"正在审核";
    __weak __typeof(&*self)weakSelf = self;
      for (UIViewController *temp in self.jt_navigationController.jt_viewControllers) {
        if ([temp isKindOfClass:[RegViewController class]]) {
            weakSelf.navigationItem.hidesBackButton = NO;
            weakSelf.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithIcon:@"navigationbar_back_highlighted" highIcon:@"" target:self action:@selector(pop)];
            
        }else if ([temp isKindOfClass:[SCLoginController class]]){
            weakSelf.typeL.text = @"提交成功,请点击完成进入商户界面";
            weakSelf.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithIcon:@"" highIcon:@"" target:self action:nil];
        }
    }

}
- (void)pop{
    
    [self.navigationController popToRootViewControllerAnimated:YES];
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}
- (IBAction)yesClick:(id)sender {
    
    __weak __typeof(&*self)weakSelf = self;
      for (UIViewController *temp in self.jt_navigationController.jt_viewControllers) {
        if ([temp isKindOfClass:[RegViewController class]]) {
                 [weakSelf.navigationController popToRootViewControllerAnimated:YES];
        }else if ([temp isKindOfClass:[SCLoginController class]]){
             [UIApplication sharedApplication].keyWindow.rootViewController =[[JTNavigationController alloc] initWithRootViewController:[[HomeController alloc] init]];
        }
    }

}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
//    self.jt_fullScreenPopGestureEnabled  = NO;
}
- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
//    self.jt_fullScreenPopGestureEnabled  = YES;
}


@end
